#include <Arduino.h>

// put function declarations here:
int led_pin = 3;
int led_val = 0;
int pot_pin = 0;
int pot_val = 0;

void setup()
{
  // put your setup code here, to run once:
  pinMode(led_pin, OUTPUT);
  Serial.begin(9600);
}

void loop()
{
  // put your main code here, to run repeatedly:
  pot_val = analogRead(pot_pin);
  Serial.print("pot_val:");
  Serial.println(pot_val);
  led_val = map(pot_val, 0, 1024, 0, 255);
  Serial.print("led_val:");
  Serial.println(led_val);
  analogWrite(led_pin, led_val);
}

// put function definitions here: